package com.qiche.service.impl;

import com.qiche.model.Workstage;
import com.qiche.service.WorkstageService;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * Created by Linzw on 2018/01/24.
 */
@Service("workstageService")
public class WorkstageServiceImpl extends BaseService<Workstage> implements WorkstageService {
	/**
	 * 根据产品标识获取工序列表
	 * @param itemId
	 * @return
	 */
	@Override
	public List<Workstage> selectByItemId(Long itemId) {
		Example example = new Example(Workstage.class);
		Example.Criteria criteria = example.createCriteria();
		criteria.andEqualTo("itemId", itemId);
		example.setOrderByClause("sort ASC");
		return selectByExample(example);
	}
}
